
import { createStore } from 'redux'
import {persistStore, persistReducer} from 'redux-persist'
import storage from 'redux-persist/lib/storage'
//引入汇总之后的reducer
import reducers from './reducer'
 
 
//在localStorge中生成key为root的值
const persistConfig = {
  key: 'root',
  storage,
  blacklist:['tabList']
}
 
const myPersistReducer = persistReducer(persistConfig, reducers)
 
const store = createStore(myPersistReducer)
 
const persistor = persistStore(store)
 
export {
  store,
  persistor
}